var coutside = $.SlotVue.extend({
    props: ['href'],
    mounted: function(){
        $.dom.on(this.$el, 'click', this.bindFunction);
    },
    destroyed: function(){
        $.dom.off(this.$el, 'click', this.bindFunction);
    },
    methods: {
        bindFunction: function(e){
            document.activeElement.blur();
            e.preventDefault();
            e.stopPropagation();
            var href = this.href;
            $.yx(function(bridge){
                bridge.callHandler('startNativePage', {
                    PageName: 'JsWebViewPage',
                    Params: {
                        Url: href
                    }
                }, function(res){});
            });
            if(!$.yx()){
                location.href = href;
            }
        }
    }
});
module.exports = coutside;
